
package com.insigma.business.qrcode.soldier.service.impl;

import com.insigma.business.qrcode.common.service.SequenceGenerator;
import com.insigma.business.qrcode.soldier.dao.VenueAppointmentScheduleDao;
import com.insigma.business.qrcode.soldier.dto.SequenceNameConstant;
import com.insigma.business.qrcode.soldier.dto.VenueAppointmentScheduleBSearcher;
import com.insigma.business.qrcode.soldier.entity.VenueAppointmentScheduleDO;
import com.insigma.business.qrcode.soldier.service.VenueAppointmentScheduleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service("venueAppointmentScheduleService")
public class VenueAppointmentScheduleServiceImpl implements VenueAppointmentScheduleService {

    @Autowired(required = false)
    private VenueAppointmentScheduleDao venueAppointmentScheduleDao;
    @Autowired(required = false)
    private SequenceGenerator sequenceGenerator;

    
    @Override
    public List<VenueAppointmentScheduleDO> search(final VenueAppointmentScheduleBSearcher venueAppointmentScheduleBSearcher) {
        return venueAppointmentScheduleDao.search(venueAppointmentScheduleBSearcher);
    }
   
    @Override
    public VenueAppointmentScheduleDO get(final String id){
        return venueAppointmentScheduleDao.get(id);
    }

    
    @Override
    public Integer insert(final VenueAppointmentScheduleDO venueAppointmentScheduleDO){
        venueAppointmentScheduleDO.setId(sequenceGenerator.genKey(SequenceNameConstant.VENUE_APPOINTMENT_SCHEDULE_ID));
        return venueAppointmentScheduleDao.insert(venueAppointmentScheduleDO);
    }

    
    @Override
    public Integer update(final VenueAppointmentScheduleDO venueAppointmentScheduleDO){
        return venueAppointmentScheduleDao.update(venueAppointmentScheduleDO);
    }

    
    @Override
    public Integer delete(final String id, final String modifierType, final String modifierId){
        return venueAppointmentScheduleDao.delete(id,modifierType,modifierId);
    }

    @Override
    public List<VenueAppointmentScheduleDO> listByVenueId(String venueId) {
        return venueAppointmentScheduleDao.listByVenueId(venueId);
    }

    @Override
    public List<VenueAppointmentScheduleDO> listByVenueIdAndType(String venueId, String appointType) {
        return venueAppointmentScheduleDao.listByVenueIdAndType(venueId, appointType);
    }

    @Override
    public Integer deleteByVenueId(String venueId) {
        return venueAppointmentScheduleDao.deleteByVenueId(venueId);
    }


}
